package cn.wolfcode.service.impl;

import cn.wolfcode.domain.UserTest;
import cn.wolfcode.mapper.UserTestMapper;
import cn.wolfcode.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    private UserTestMapper userTestMapper;

    @Override
    public boolean login(String username, String password) {
        UserTest userTest = new UserTest();
        userTest.setUsername(username);
        userTest.setPassword(password);
        UserTest user = userTestMapper.selectUser(userTest);
        if (user != null) {
            return true;
        }
        return false;
    }
}
